<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<%@ include file="/common/meta.jsp"%>
<div class="page">
	<div class="pageHeader">
		<p>
			<br />
			用户信息查看
			<security:authorize ifAnyGranted="A_MODIFY_USER">/修改</security:authorize>
		</p>
	</div>
	<div class="pageContent">
		<form method="post" action="${ctx}/account/user!save.action" class="pageForm required-validate"
			onsubmit="return validateCallback(this, navTabAjaxDone);">
			<div class="pageFormContent" layoutH="90">
				<input type="hidden" name="id" id="id" value="${id }" />
				<p>
					<label>
						ID号：
					</label>
					<input type="text" name="loginName" id="loginName" value="${loginName}" size="30"
						class="required" maxlength="20" alt="请输入登陆名" />
				</p>
				<p>
					<label>
						姓名：
					</label>
					<input type="text" id="realName" name="realName" value="${realName}" class="required"
						alt="请输入客户名称" size="30" />
				</p>
				<p>
					<label>
						昵称：
					</label>
					<input type="text" id="nickName" name="nickName" value="${nickName}" size="30" />
				</p>
				<p>
					<label>
						性别：
					</label>
					<core:select id="sex" dicTypeCode="SEX" defaultValue="${sex}" attribute="class='combox' " />
				</p>
				<c:if test="${empty id}">
					<p>
						<label>
							密码：
						</label>
						<input type="password" id="password" name="password" maxlength="32" minlength="6"
							class="required alphanumeric" value="${password}" size="30" />
					</p>
					<p>
						<label>
							确认密码：
						</label>
						<input type="password" id="passwordConfirm" name="passwordConfirm" maxlength="32"
							minlength="6" class="required alphanumeric" equalTo="#password" value="${password}" size="30" />
					</p>
				</c:if>
				<p>
					<label>
						出生日期：
					</label>
					<input type="text" id="birthday" name="birthday" class="date" size="30"
						value="<fmt:formatDate value="${birthday}" pattern="yyyy-MM-dd"/>" readonly="readonly" />
					<a class="inputDateButton" href="javascript:void(0)">选择</a>
				</p>
				<p>
					<label>
						入职日期：
					</label>
					<input type="text" id="joinTime" name="joinTime" class="required date" size="30"
						value="<fmt:formatDate value="${joinTime}" pattern="yyyy-MM-dd"/>" readonly="readonly" />
					<a class="inputDateButton" href="javascript:void(0)">选择</a>
				</p>
				<p>
					<label>
						手机：
					</label>
					<input type="text" id="mobile" name="mobile" value="${mobile}" size="30" />
				</p>
				<p>
					<label>
						电话：
					</label>
					<input type="text" id="phone" name="phone" value="${phone}" class="phone" size="30" />
				</p>
				<p>
					<label>
						身份证：
					</label>
					<input type="text" id="idCard" name="idCard" value="${idCard}" size="30" />
				</p>
				<p>
					<label>
						邮箱：
					</label>
					<input type="text" id="email" name="email" value="${email}" class="email" size="30" />
				</p>
				<p>
					<label>
						用户状态：
					</label>
					<core:select id="status" dicTypeCode="USER_STATUS" defaultValue="${status}" />
				</p>
				<p>
					<label>
						可否登陆：
					</label>
					<input type="radio" id="loginIs" name="loginIs" value="true" checked="checked" />
					是
					<input type="radio" id="loginIs" name="loginIs" value="false"
						<c:if test="${loginIs ==false and not empty id}">checked="checked"</c:if> />
					否
				</p>
				<p>
					<label>
						角色：
					</label>
					<input id="roleIds" name="roleIds" type="hidden" 
						value="<c:forEach var="role" items="${roleSet}" >${role.id },</c:forEach>">
					<input id="roleNames" name="roleNames" type="text" class="required"  size="30"
						value="<c:forEach var="role" items="${roleSet}" >${role.name },</c:forEach>">
					<a class="btnLook" href="${ctx}/account/role!chooseList.action" lookupGroup="">查找带回</a>
				</p>
				<p>
					<label>
						职位：
					</label>
					<input id="postIds" name="postIds" type="hidden" 
						value="<c:forEach var="post" items="${postSet}" >${post.id },</c:forEach>">
					<input id="postNames" name="postNames" type="text"   size="30"
						value="<c:forEach var="post" items="${postSet}" >${post.name },</c:forEach>">
					<a class="btnLook" href="${ctx}/account/post!chooseList.action" lookupGroup="">查找带回</a>
				</p>
				<p>
					<label>
						部门：
					</label>
					<input id="deptIds" name="deptIds" type="hidden" 
						value="<c:forEach var="dept" items="${deptSet}" >${dept.id },</c:forEach>">
					<input id="deptNames" name="deptNames" type="text" size="30"
						value="<c:forEach var="dept" items="${deptSet}" >${dept.name },</c:forEach>">
					<a class="btnLook" href="${ctx}/account/dept!chooseList.action" lookupGroup="">查找带回</a>
				</p>
				<p>
					<label>
						组：
					</label>
					<input id="groupIds" name="groupIds" type="hidden" 
						value="<c:forEach var="group" items="${groupSet}" >${group.id },</c:forEach>">
					<input id="groupNames" name="groupNames" type="text" size="30"
						value="<c:forEach var="group" items="${groupSet}" >${group.name },</c:forEach>">
					<a class="btnLook" href="${ctx}/account/group!chooseList.action" lookupGroup="">查找带回</a>
				</p>
				<p style="height: 180px">
					<label>
						备注：
					</label>
					<textarea rows="10" cols="100" id="description" name="description" tools="simple"
						class="editor">
						${description }
					</textarea>
				</p>
				<%@include file="/common/createInfo.jsp"%>
			</div>
			<c:set var="granted">A_MODIFY_USER</c:set>
			<%@include file="/common/formBar.jsp"%>
		</form>
	</div>
</div>